<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>作业6</title>
		<style>
			div{
				background-color: chocolate;
			}
			li{
				background-color: aqua;
				margin-top: 10px;
			}
		</style>
	</head>
	<body>
		<div id="wrapper">
			<ul>
				<li>iten list 1</li>
				<li>iten list 2</li>
				<li>iten list 3</li>
				<li>iten list 4</li>
				<li>iten list 5</li>
			</ul>
		</div>
		
		
		<script>
			window.addEventListener('click',function(){
				console.log("window is clicked");
			});
			document.addEventListener('click',function(){
				console.log("document is clicked");
			});
			wrapper.addEventListener('click',function(e){
				console.log("wrapper is clicked");
				
			});
			var lists = document.querySelectorAll("li");
			for(let i=0;i<lists.length;i++){
				lists[i].addEventListener('click',function(){
					console.log(this.innerHTML+" "+"is click");
				})
			}
			document.querySelector("ul").addEventListener('click',function(){
				console.log("ul is click");
				event.stopPropagation();
			})
			
		</script>
	</body>
</html>